package com.markerhub.controller;


import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.markerhub.common.lang.Result;
import com.markerhub.entity.SysSemester;
import com.markerhub.entity.SysTime;
import com.markerhub.service.SysSemesterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wang
 * @since 2022-04-27
 */
@RestController
@RequestMapping("/sys-semester")
public class SysSemesterController extends BaseController {
    @Autowired
    SysSemesterService sysSemesterService;

    @GetMapping("/listAll")//获取上课地点列表
    public Result listAll(String username){

        List<SysSemester> pageData = sysSemesterService.list(new QueryWrapper<SysSemester>()
                .like(StrUtil.isNotBlank(username), "username", username));
        return Result.succ(pageData);
    }
}
